import Mock from 'mockjs'


import homeApi from './mockServeData/home'
import userApi from './mockServeData/user'
import permissionApi from './mockServeData/permission'


Mock.mock(/home\/getData/, homeApi.getStatisticalData);

Mock.mock(/user\/getUserList/, 'get', userApi.getUserList);

Mock.mock(/user\/deleteUser/, 'post', userApi.deleteUser);

Mock.mock(/user\/createUser/, 'post', userApi.createUser);

Mock.mock(/user\/updateUser/, 'post', userApi.updateUser);

Mock.mock(/permission\/getMenu/, 'post', permissionApi.getMenu);

// // 拦截请求
// Mock.mock('/home/multidata', 'get', {
//     success: true,
//     message: '获取数据成功',
//     data: {
//         'data|5': [{
//             'id|+1': 1,
//             'title': '@ctitle(5, 10)',
//             'author': '@cname',
//             'date': '@date("yyyy-MM-dd")',
//             'content': '@cparagraph(1, 3)'
//         }]
//     }
// })